<?php

/**
 * @author Dang Quoc Viet
 * @copyright 2009
 */

class MyMenuHelper extends Helper{ 

    var $helpers = array('Html'); 
     
    function menu($data=array()){ 
    	$out =''; 
        $out .= $this->Html->css('my_menu_css'); 
        return $this->output($out. $this->_cm_render($data)); 
    } 

    function _cm_render($data=array()){ 
        $out=''; 
        if($data == array()) return; 
        if(is_array($data)){ 
            $out .= '<ul class="nav-menu">'; 
            foreach($data as $item){ 
                $out .= '<li class="nav-menu"><a href="'. $item['url']. '">'. $item['title']. '</a></li>';                 
            } 
            $out .=  "</ul>";
        } 
        return $out; 
    } 
} 
?> 